home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 10 / Amoszine 10 (Disk 3 of 3).adf / Text_Files.lha / pp_lib_amos.txt2 < prev    next >
Text File  |  1995-12-11  |  2KB  |  60 lines

  1.  
  2.  Hi Paul,
  3.  
  4.  Thanks very much for taking the time to write me such a well commented,
  5.  helpful program as well as the info from the autodoc!
  6.  It took a bit of getting at since I don't have uuencode:  I had to put
  7.  it on a PC disk using crossdos, take it to uni and forward it to myself
  8.  via internet email so I could then extract the file using a function in
  9.  the mail reader! :)
  10.  
  11.  I've been trying to figure out how to write the crunched file.
  12.  I'll show you what I've come up with after looking in some books - I've
  13.  never written files using doslibrary!
  14.  
  15.  1) Use Open() to open the file:
  16.     Dreg(1)=Varptr(FILENAME$)
  17.     Dreg(2)=1006 : Rem MODE_NEW
  18.     FILEHANDLE=Doscall(-30)
  19.  
  20.  2) Call ppWriteDataHeader
  21.     See below: 
  22.  
  23.  3) Use Write() to write the crunched data:
  24.     Dreg(1)=FILEHANDLE
  25.     Dreg(2)=BUF
  26.     Dreg(3)=NEWSIZ
  27.     D0=Doscall(-48)
  28.  
  29.  4) Use Close() to close the file:
  30.     Dreg(1)=FILEHANDLE
  31.     D0=Doscall(-36)
  32.  
  33.  Step 2 is where I'm stuck.
  34.  The info you gave me was
  35.  success = ppWriteDataHeader ( lock , efficiency , crypt , checksum );
  36.  ULONG                         BPTR   ULONG        BOOL    ULONG
  37.  D0                            D0     D1           D2      D3:16
  38.  _LVOppWriteDataHeader = -114
  39.  
  40.  The problem is I've no idea what to load the registers with.
  41.  Guess-time:
  42.    Do I by any chance load D0 with the filehandle?
  43.    Presumably efficiency is the same as it is in the other routines?
  44.    Do I load D2 with 0 since no encryption has been used?
  45.  
  46.  Also,
  47.   What do BPTR and :16 mean?
  48.  
  49.  Sorry for asking you yet more questions!
  50.  
  51.  Thanks again for your help.
  52.  
  53.  Regards,
  54.  
  55.  
  56.    /|
  57.   /_|                          FidoNet: 2:250/102
  58.  /  |ndrew.                   InterNet: mmmr3acj@fs2.scg.man.ac.uk
  59.  
  60.